import java.util.*;

// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
    public static void main(String[] args) {
//        Map<String, String> mp = new HashMap<>();
//        mp.put("name", "wc");
//        mp.put("wccc", "ad");
//        Iterator iterator = mp.values().iterator();
//        while (iterator.hasNext()) {
//            System.out.println(iterator.next());
//        }
//
//        Set<String> st = mp.keySet();
//        for (String str : st) {
//            System.out.println(str + " " + mp.get(str));
//        }

        List<String> ls = new ArrayList<>();
        List<String> play1 = new ArrayList<>();
        List<String> play2 = new ArrayList<>();
        List<String> play3 = new ArrayList<>();
        String[] color = new String[] {"方块", "黑桃", "红心", "梅花"};
        String[] number = new String[] {"A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "j", "q", "k"};
        for (String c : color) {
            for(String n:number) {
                ls.add(c + " " + n);
            }
        }
        ls.add("King");
        ls.add("Queen");
        Collections.shuffle(ls);
        Iterator iterator = ls.listIterator();
        List<String> b = ls.subList(51, 54);
        System.out.println(b);

        for (int i = 1;i <= 51;i ++ ) {
            String value = (String) iterator.next();
            if (i % 3 == 1) {
                play1.add(value);
            }
            if (i % 3 == 2) {
                play2.add(value);
            }
            if (i % 3 == 0) {
                play3.add(value);
            }
        }

        Random random = new Random();
        int rd = random.nextInt(3) + 1;
        if (rd == 1) play1.addAll(b);
        if (rd == 2) play2.addAll(b);
        if (rd == 3) play3.addAll(b);
        System.out.println("play1 " + play1);
        System.out.println("play1 " + play2);
        System.out.println("play1 " + play3);

    }
}